package com.unicom.projt.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by IntelliJ IDEA.
 * User: Lee
 * Date: 11-12-14
 * Time: 下午7:44
 */
public class CheckUtils {
    public static boolean isMobileNo(String mobiles){
        Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
        Matcher m = p.matcher(mobiles);
//        System.out.println(m.matches()+"---");
        return m.matches();
    }
    public static boolean isNumber(String mobiles){
        Pattern p = Pattern.compile("\\d+");
        Matcher m = p.matcher(mobiles);
        return m.matches();
    }

//    public static void main(String[] args) {
//        System.out.println(isMobileNo("18656789043"));
//    }
}
